CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -fPIC
SRCDIR = .
OBJDIR = ../RELEASE
TARGET = $(OBJDIR)/libcourse.a

SOURCES = $(SRCDIR)/course.c
OBJECTS = $(OBJDIR)/course.o

.PHONY: all clean

all: $(TARGET)

$(TARGET): $(OBJECTS)
	ar rcs $@ $^
	@echo "ModuleB library created: $@"

$(OBJECTS): $(SOURCES)
	@mkdir -p $(OBJDIR)  
	$(CC) $(CFLAGS) -I../Include -c $(SOURCES) -o $@  

clean:
	rm -f $(OBJDIR)/course.o $(TARGET)